package org.easy.chatai.model;

import lombok.*;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Setter
@Getter
public class AiMessage {

    public static final String TEXT_TYPE = "text";
    public static final String IMG_TYPE = "img";

    public static AiMessageBuilder system() {
        return AiMessage.builder().role("system").type(TEXT_TYPE);
    }

    public static AiMessageBuilder assistant() {
        return AiMessage.builder().role("assistant").type(TEXT_TYPE);
    }

    public static AiMessageBuilder user() {
        return AiMessage.builder().role("user").type(TEXT_TYPE);
    }

    public static AiMessageBuilder userImg() {
        return AiMessage.builder().role("user").type(IMG_TYPE);
    }

    /**
     * 格式 text ,img
     */
    private String type;

    /**
     * role 只支持 system,user,assistant 其一
     */
    private String role;

    /**
     * 内容
     */
    private Object content;
}